#ifndef __log_H__
#define __log_H__

#include "usart.h"
#include "stdio.h"

#define print_level 0

#define __FILENAME__ (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1):__FILE__)

#define LOG_DEBUG(fmt, ...)     if(print_level)printf("[D][%s:%d]"fmt"\r\n", __FILE__, __LINE__, ##__VA_ARGS__)
#define LOG_BIN(data, len)      if(print_level)LOG_Binary((char *)data, len)  

#endif
